#pragma once

namespace AVUI
{
    class DependencyObject;
    class FrameworkElement;
    class FrameworkContentElement;

    class Helper
    {
    public:
        static bool HasDefaultValue(DependencyProperty* pDP, DependencyObject* pDO, FrameworkElement* pFE, FrameworkContentElement* pFCE);
        static TRefCountedPtr<Object> FindNameInTemplate(String* pName, DependencyObject* pTemplatedParent);
        static DependencyObject* GetTemplatedParent(DependencyObject* pObject);
        static DependencyObject* FindMentor(DependencyObject* pDO);
        static void DowncastToFEorFCE(DependencyObject* pDO, FrameworkElement** ppFe, FrameworkContentElement** ppFce, bool throwIfNeither);
        static Object* FindTemplateResourceFromAppOrSystem(DependencyObject* pTarget, ArrayList* pKeys, int exactMatch, int* pBestMatch);
        static void SetMeasureDataOnChild(UIElement* pElement, UIElement* pChild, const Size& childConstraint);
    };
}
